<template>
    <div class="pwd-input">
        <img :src="imgUrl" alt="">
        <van-uploader :after-read="afterRead">
          <van-button type="primary">点击更换头像</van-button>
        </van-uploader>
    </div>
</template>
<script>
import { uploadImg,getImg } from '@/api.js'
export default {
    data() {
        return {
            file_show:'',
            imgUrl:''
        }
    },
    created() {
        this.getImg()
    },
    methods: {
        // async getImg() {
        //     await getImg().then(res => {
        //         console.log(res)
        //     })
        // },      

    }

}
</script>
<style lang="less" scoped>
      .img{
        margin-left: 2rem;
        margin-top: 0.3rem;
      }
</style>